package com.example.lbstest.impl;

import com.example.lbstest.mapper.CardMapper;
import com.example.lbstest.pojo.Card;
import com.example.lbstest.service.CardMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//实现CardMapperService接口
@Service
public class CardMapperServiceImpl implements CardMapperService {

    @Autowired
    CardMapper cardMapper;

    @Override
    public int insertOneCard(Card card) {
        return cardMapper.insertOneCard(card);
    }

    @Override
    public int setStatus(String id) {
        return cardMapper.setStatus(id);
    }

    @Override
    public List<Card> getCardList(String teacher_code) {
        return cardMapper.getCardList(teacher_code);
    }


    @Override
    public int delayTimeUpdate(String code, String class_number) {
        return cardMapper.delayTimeUpdate(code, class_number);
    }

    @Override
    public int delayTimeInsert(String code, String class_number, String time) {
        return cardMapper.delayTimeInsert(code, class_number, time);
    }

    @Override
    public int punchCardDelay(String code, String class_number) {
        return cardMapper.punchCardDelay(code, class_number);
    }

    @Override
    public int punchCardIn(String code, String class_number) {
        return cardMapper.punchCardIn(code, class_number);
    }

    @Override
    public int insertPunchCard(String student_number, String class_number, String code, String time, String status) {
        return cardMapper.insertPunchCard(student_number, class_number, code, time, status);
    }

    @Override
    public Card getCard(String class_number, String code) {
        return cardMapper.getCard(class_number, code);
    }

    @Override
    public int updateOneCardWhere(String class_number, String student_number, String code) {
        return cardMapper.updateOneCardWhere(class_number, student_number, code);
    }

    @Override
    public int insertPunchCardAndAsk(String class_number, String student_number, String code, String time) {
        return cardMapper.insertPunchCardAndAsk(class_number, student_number, code, time);
    }

    @Override
    public int punchCardAskOne(String class_number, String code) {
        return cardMapper.punchCardAskOne(class_number, code);
    }

    @Override
    public int punchCardAskTwo(String class_number, String code) {
        return cardMapper.punchCardAskTwo(class_number, code);
    }

    @Override
    public String selectPunchCard(String class_number, String student_number, String code) {
        return cardMapper.selectPunchCard(class_number,student_number,code);
    }

}
